import { createSlice } from "@reduxjs/toolkit";
import { Config } from "@/config/index.jsx";

export const SettingStore = createSlice({
  name: "SettingStore",
  initialState: {
    ...Config,
  },
  reducers: {
    setCollapsed: (state, action) => {
      state.collapsed = action.payload;
    },
    setHeaderBackgroundColor: (state, action) => {
      state.headerBackgroundColor = action.payload;
    },
  },
});
const { setCollapsed,setHeaderBackgroundColor } = SettingStore.actions;
export { setCollapsed,setHeaderBackgroundColor };
const reducer = SettingStore.reducer;
export default reducer;
